package anc.server.tankshooter.database;

import java.sql.Connection;

import anc.server.tankshooter.models.IEntity;

public abstract class IManager {
	
	private String mTableName;
	protected Connection mConnection;
	
	public IManager(Connection connection,String tableName) {
		this.mConnection=connection;
		this.mTableName=tableName;
	}

	public String getTableName() {
		return mTableName;
	}
	
	public abstract int add(IEntity entity);
	public abstract boolean update(IEntity entity);
	public abstract boolean delete(int entityId);
	public abstract boolean isExist(int entityId);
	/**
	 * Đếm số lượng record trong database
	 * @return
	 */
	public abstract int count();
}
